from manimlib import *
from numpy import square
import numpy as np

class Test(Scene):
    #75cfb8
    #浅绿
    #bbdfc8
    #浅黄
    #f0e5d8
    #深黄
    #ffc478
    def construct(self):
        # self.add(NumberPlane()) 
        # ,,,
        a,b,c,d,e=[-3,3,0],[3,3,0],[3,-3,0],[-3,-3,0],[0,3*np.tan(PI/12)-3,0]
        f,g=[0,-3,0],[0,3,0]
        cf,gf,gb=Line(c,f),Line(g,f,color=BLACK),Line(g,b)
        self.add(Tex('A').next_to(a,UL),Tex('B',).next_to(b,UR),Tex('C',).next_to(c,DR),Tex('D',).next_to(d,DL),Tex('E',).next_to(e,UL))
        self.add(Line(e,b,color=BLACK),Line(e,c,color=BLACK),Line(e,d,color=BLACK))
        angle1=Angle(Line(d,c),Line(d,e),color='#75cfb8')
        angle2=Angle(Line(c,e),cf,color='#75cfb8')
        self.add(angle1,angle2)
        self.add(Tex('15^\circ',color='#75cfb8').move_to([-2.5,-3.3,0]),Tex('15^\circ',color='#75cfb8').move_to([2.5,-3.3,0]))
        self.add(Angle(Line(b,e),Line(b,c),color='#ffc478'))
        self.add(Square(side_length=6,color=BLACK))
        question=Tex(r'\angle EBC=?',color='#ffc478').shift(UP*2)
        self.add(question)
        self.wait(0.03)
        self.remove(question)
        a3=Angle(gf,gb,elbow=True,color=BLACK)
        a4=Angle(cf,gf,elbow=True,color=BLACK,quadrant=(-1,-1))
        self.add(a3,a4,gf)
        self.add(Tex('1').next_to(cf,DOWN),Tex('1').next_to(gb,UP),Tex('2').next_to(Line(a,d),LEFT),Tex('G').next_to(g,UP),Tex('F').next_to(f,DOWN))
        self.wait(0.03)
        
